package com.hj.client;

import java.util.ArrayList;

import android.app.TabActivity;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ListView;
import android.widget.TabHost;
import android.widget.TextView;

public class dynamicNews extends TabActivity implements
		TabHost.TabContentFactory {
	/**
	 * {@inheritDoc}
	 * */
	private ListView listView = null;
	private ListViewAdapter adapter = null;
	private ArrayList<Object> list = new ArrayList<Object>();
	Context f = null;

	public dynamicNews(Context c) {
		f = c;
        listView = (ListView) findViewById(R.id.messagelist);
		for (int i = 0; i < 10; i++) {
			list.add(i + "name");
		}
		adapter = new ListViewAdapter(f, list);
		listView.setAdapter(adapter);		
	}

	public View createTabContent(String tag) {
		final TextView tv = new TextView(f);
		tv.setText("Content of news list " + tag);

		return tv;
	}
}
